package org.quickjsf.core.base.dao;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import org.hibernate.criterion.Criterion;
import org.quickjsf.core.base.viewmodel.vo.FieldFilter;

public interface IBaseDao<T> {
	
	public Serializable save(T entity);
	
	public void update(T entity);
	
	public void delete(T entity);
	
	public void deleteAll(Collection<T> entities);
	
	public T queryById(Serializable id);
	
	public T fetchAllById(final Serializable id);
	
	public List<T> queryAll();
	
	public PageModel<T> queryTable(final int first, final int pageSize, final String sortField, final String sortName, final List<Criterion> criterions);

	public PageModel<T> getTableFilterList(int first, int pageSize,
			String sortField, String sortName, List<FieldFilter> fieldFilters);
}
